import { Component, OnInit } from '@angular/core';
import { BladeService } from "../../../../shared/blade.service";
import {BladeData} from '../../../../shared/blade/blade-data';
import { Observable } from "rxjs/Observable";
import { MenuShortcutListComponent } from "../menu-shortcut/menu-shortcut-list/menu-shortcut-list.component";

@Component({
  selector: 'app-menu-shortcut',
  templateUrl: './menu-shortcut.component.html',
  styleUrls: ['./menu-shortcut.component.css']
})
export class MenuShortcutComponent implements OnInit {

  constructor(public bladeService: BladeService) { }

  ngOnInit() {
    this.createRolePermissionListBlade()
  }

  createRolePermissionListBlade() {
    let data: BladeData = new BladeData();
    data.id = "menuShortcutList";
    data.title = "固定菜单";
    data.subtitle = "固定菜单列表";
    data.isClosingDisabled = true;
    let rolePermissionListBlade = this.bladeService.createBlade(MenuShortcutListComponent, data);
    this.bladeService.showBlade(rolePermissionListBlade);
  }

  canDeactivate(): boolean | Observable<boolean> | Promise<boolean> {
    return true;
  }
}



// WEBPACK FOOTER //
// ./src/app/module/admin/role/menu-shortcut/menu-shortcut.component.ts
